package com.hu.adapter;

import com.hu.common.user.UserInfo;
import com.hu.pojo.entity.User;

public class UserBuilder {
    public static UserInfo buildUserInfo(User user) {
        UserInfo loginUserVO = new UserInfo();
        loginUserVO.setId(user.getId());
        loginUserVO.setUserName(user.getUserName());
        loginUserVO.setUserAvatar(user.getUserAvatar());
        loginUserVO.setUserPermission(user.getUserPermission());
        loginUserVO.setUserProfile(user.getUserProfile());
        loginUserVO.setUserRole(user.getUserRole());
        loginUserVO.setVipExpireTime(user.getVipExpireTime());
        loginUserVO.setVipNumber(user.getVipNumber());
        loginUserVO.setSex(user.getSex());
        loginUserVO.setCreateTime(user.getCreateTime());
        loginUserVO.setUpdateTime(user.getUpdateTime());
        return loginUserVO;

    }
}
